Restore comment-memory config for deterministic memory-read jobs#44214
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and recompile |
…consumption-deterministic-job Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage
Rationale: Draft PR. Fixes incomplete deterministic memory-restore paths for comment-memory in custom jobs. Legitimate fix with tests and docs, but needs CI and author to undraft. Run §28924016278
|
There was a problem hiding this comment.
Pull request overview
This PR makes deterministic memory-restore flows consistent with the main agent job by ensuring the minimal comment-memory config is written before setup_comment_memory_files.cjs runs in both pre-activation on.steps and custom jobs that opt into restore-memory.
Changes:
- Reused the existing early “Write comment-memory configuration” emission for pre-activation and custom-job restore paths.
- Tightened tests to assert ordering: config write → comment-memory prepare → user/deterministic steps.
- Updated steps/jobs reference docs and regenerated many workflow
.lock.ymlfiles.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/on_steps_test.go | Adds ordering assertions for pre-activation comment-memory config + restore steps. |
| pkg/workflow/compiler_pre_activation_job.go | Injects early comment-memory config write before pre-activation comment-memory restore step. |
| pkg/workflow/compiler_custom_job_memory.go | Injects early comment-memory config write for custom jobs using jobs.<id>.restore-memory: true. |
| pkg/workflow/compiler_custom_job_memory_test.go | Asserts presence and ordering of comment-memory config/restore steps in custom jobs. |
| docs/src/content/docs/reference/steps-jobs.md | Documents jobs.<job-id>.restore-memory and its step ordering semantics. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/workflow-health-manager.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/workflow-generator.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/weekly-issue-summary.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/weekly-blog-post-writer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/unbloat-docs.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/uk-ai-operational-resilience.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/tidy.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/terminal-stylist.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/technical-doc-writer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/sub-issue-closer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/step-name-alignment.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/stale-repo-identifier.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/stale-pr-cleanup.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/spec-librarian.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/spec-extractor.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/spec-enforcer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-project.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-pi.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-otel-backends.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-opencode.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-gemini.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-crush.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-copilot-aoai-entra.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-copilot-aoai-apikey.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-codex.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-claude-on-copilot.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-ci.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-antigravity.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/smoke-agent-public-approved.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/skillet.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/security-review.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/security-compliance.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/schema-feature-coverage.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/schema-consistency-checker.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/repository-quality-improver.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/repo-audit-analyzer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/refiner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/refactoring-cadence.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/q.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/pr-triage-agent.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/pr-description-caveman.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/pr-code-quality-reviewer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/plan.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/outcome-collector.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/org-health-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/objective-impact-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/notion-issue-summary.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/necromancer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/metrics-collector.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/mergefest.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/mattpocock-skills-reviewer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/linter-miner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/lint-monster.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/layout-spec-maintainer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/jsweep.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/issue-triage-agent.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/issue-arborist.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/instructions-janitor.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/impeccable-skills-reviewer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/hourly-ci-cleaner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/grumpy-reviewer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/gpclean.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/go-logger.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/github-mcp-tools-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/functional-pragmatist.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/firewall-escape.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/example-permissions-warning.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/eslint-refiner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/eslint-monster.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/eslint-miner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/draft-pr-cleanup.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/discussion-task-miner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dictation-prompt.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dev.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dev-hawk.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/designer-drift-audit.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/design-decision-gate.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/deployment-incident-monitor.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dependabot-repair.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dependabot-go-checker.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dependabot-burner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/delight.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dead-code-remover.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/dataflow-pr-discussion-dataset.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-workflow-updater.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-windows-terminal-integration-builder.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-team-status.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-spdd-spec-planner.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-semgrep-scan.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-security-red-team.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-security-observability.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-secrets-analysis.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-safeoutputs-git-simulator.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-safe-output-integrator.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-repo-chronicle.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-regulatory.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-performance-summary.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-observability-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-model-resolution.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-model-inventory.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-malicious-code-scan.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-issues-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-geo-optimizer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-formal-spec-verifier.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-file-diet.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-fact.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-experiment-report.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-doc-updater.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-doc-healer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-compiler-threat-spec-optimizer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-compiler-quality.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-community-attribution.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-code-metrics.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-cli-performance.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-choice-test.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-cache-strategy-analyzer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-ambient-context-optimizer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/daily-agent-of-the-day-blog-writer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/craft.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/copilot-session-insights.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/copilot-opt.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/copilot-cli-deep-research.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/copilot-agent-analysis.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/contribution-check.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/commit-changes-analyzer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/code-simplifier.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/code-scanning-fixer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/ci-doctor.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/ci-coach.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/breaking-change-checker.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/bot-detection.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/avenger.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/artifacts-summary.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/archie.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/approach-validator.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/ai-moderator.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/agentic-token-optimizer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
| .github/workflows/ab-testing-advisor.lock.yml | Regenerated lockfile (MCP config heredoc/guard-policy output updates). |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 200/200 changed files
- Comments generated: 3
- Review effort level: Low
| if cfg.CommentMemory { | ||
| if configLines, ok := c.generateCommentMemoryEarlyConfigLines(data); ok { | ||
| memoryLines = append(memoryLines, configLines...) | ||
| } | ||
| memoryLines = append(memoryLines, generateCommentMemoryRestoreLines(data)...) | ||
| } |
| if data.SafeOutputs != nil && data.SafeOutputs.CommentMemory != nil { | ||
| if configLines, ok := c.generateCommentMemoryEarlyConfigLines(data); ok { | ||
| steps = append(steps, strings.Join(configLines, "")) | ||
| } | ||
| var commentMemorySteps strings.Builder |
| "write-sink": { | ||
| "accept": [ | ||
| "*" | ||
| ], | ||
| "sink-visibility": "public" | ||
| ] | ||
| } |
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…consumption-deterministic-job Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…pile Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 2164816. Also fixed the reviewer's feedback: both |
Add three new user-facing terms from today's commits: - dismiss-pull-request-review: New safe output capability for dismissing PR reviews authored by the workflow actor (PR #44209) - COPILOT_GITHUB_TOKEN: Fine-grained PAT for Copilot inference, now validated in activation job for OAuth token detection (PR #44204) - restore-memory (jobs.<job-id>.restore-memory): New custom job field for read-only memory store restore in deterministic jobs (PR #44214) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
Persisted memory was already restorable for the agent job, but deterministic paths were incomplete: custom jobs and
on.stepscould invoke comment-memory restore without first materializing the minimal config thatsetup_comment_memory_files.cjsreads. This left the “plan work from memory before the agent runs” flow partially implemented.What changed
jobs.<job-id>.restore-memory: trueon.restore-memory: trueBehavioral impact
comment-memoryreliably before agent execution, alongside the existing cache/repo-memory restore paths.Tests
Prepare comment memory files, and both occur before user-defined deterministic steps.Docs
jobs.<job-id>.restore-memoryand its placement in custom job step ordering.